package 最值算法.数组中两元素的最大乘积;

import java.util.Arrays;

/**
 * TODO
 *
 * @className: szzlysdzdcj
 * @description: TODO
 * @author: 等什么柠檬君
 * @date: 2022-05-10 17:30
 **/
public class szzlysdzdcj {
    public static void main(String[] args) {

    }
    public int maxProduct(int[] nums) {
        Arrays.sort(nums);
        return (nums[nums.length-1]-1)*(nums[nums.length-2]-1);
    }
}
